import os
from dotenv import load_dotenv, find_dotenv

# Load environment variables from .env file
load_dotenv(find_dotenv())


class BackgroundAgentConfig:
    """
    Configuration for the Background Agent.
    """
    def __init__(self):
        print("🔄 加载配置")
        self.agent_name = "Background Agent"
        self.mcp_url = f"http://{os.getenv("MCP_HOST","localhost")}:{os.getenv("MCP_PORT","8000")}/mcp"
        self.mcp_name = os.getenv("MCP_NAME", "background-mcp-server")
        self.wanx_model_name = os.getenv("MODEL_NAME", "wanx2.1-t2i-turbo")
        self.wanx_model_base_url = os.getenv("MODEL_BASE_URL", "https://api.dashscope.com/v1")
        self.llm_model_base_url = os.getenv("LLM_MODEL_BASE_URL", "https://dashscope.aliyuncs.com/compatible-mode/v1")
        self.llm_model_name = os.getenv("LLM_MODEL_NAME", "qwen-turbo")
        self.api_key = os.getenv("DASHSCOPE_API_KEY", "sk-86a0c2d10fde45f5bbf516dcd7102529")
        print(f"✅ 已加载配置:{self.__dict__}")